﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>@ViewBag.Title</title>
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/modernizr-1.7.min.js")" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $('li[product_id=@(Session["product_id"])]').addClass('navbar-item-selected');

            $('#navbar > li[role=tab]').click(function () {
                var productId = $(this).attr('product_id');
                //window.location = '@(Url.Content("~"))sessions/update?product_id=' + productId;
                window.location = '@(Url.Content("~"))products/' + productId;
            });
        });
    </script>
</head>
<body>
    <div id="navbar-container">
        <h1 id="navbar-content-title" i18n-content="title">
            ScrumTracker</h1>
        <ul id="navbar">
            <li id="searchPageNav" class="navbar-item" pagename="search" role="" tabindex="-1">
                <input id="search-field" type="search" incremental="" placeholder="Search">
            </li>
            @foreach (var product in @ViewBag.Products as List<Product>)
            {
                <li class="navbar-item" role="tab" product_id="@product.ProductId">@product.Name</li>
            }
        </ul>
    </div>
    <div id="mainview">
        <div id="mainview-content">
            <div id="page-container">
                <div class="page">
                    @RenderBody()
                </div>
            </div>
        </div>
    </div>
</body>
</html>
